# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libmediaart
pkgver=1.9.4
pkgrel=1
pkgdesc="Library tasked with managing, extracting and handling media art caches"
url="https://git.gnome.org/browse/libmediaart"
arch=(i686 x86_64)
license=(LGPL)
depends=(gdk-pixbuf2)
makedepends=(vala gobject-introspection git gtk-doc meson)
_commit=7077be9ee9a698550216f07cb0b8ca6ec5ca1eb3  # tags/1.9.4^0
source=("git+https://git.gnome.org/browse/libmediaart#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  mkdir build
  cd $pkgname
}

build() {
  cd build
  meson --prefix=/usr --buildtype=release ../$pkgname
  ninja
}

check() {
  cd build
  mesontest
}

package() {
  cd build
  DESTDIR="$pkgdir" ninja install
}
